{\rtf1\ansi\ansicpg1251\deff0\deflang1058\deflangfe1058\deftab708{\fonttbl{\f0\fswiss\fprq2\fcharset204 Calibri;}{\f1\fswiss\fprq2\fcharset0 Calibri;}{\f2\froman\fprq2\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue0;\red255\green255\blue255;}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\nowidctlpar\qc\b\f0\fs32 Inter-program interacting protocol\par
\par
\pard\fi-705\li1065\qj\fs28 1.\tab\lang1033\f1 General description\lang1058\b0\f0\fs32\par
\lang1033\f1\tab\lang1058\f0\fs24 Clients interact with each other by sending unified messages, format of which is described in the below section. One of these clients who manage the game is also a server, all others are clients. All messages are exchanged between a server and clients only, but between a client and other client.\par
\pard\li1065\qj\par
\pard\nowidctlpar\fi-705\li1065\qj\b\fs28 2.\tab The format of messages\b0\fs20\par
\pard\nowidctlpar\li1065\qj\i\fs24 <message type tag>[<delimiter><parameter1>[\'85]]<EOM>\par
\i0 Here:\par
\pard\nowidctlpar\fi-360\li1425\qj\lang1033\f2\'b7\tab\lang1058\i\f0 <message type tag>\i0  \emdash  defines what is the type of message and its structure (may be \b\i CS_FIRE\b0\i0 , \b\i CS_SEND_NICK\b0\i0 , \b\i CS_SEND_SNAPSHOT\b0\i0  etc., see the next section);\par
\lang1033\f2\'b7\tab\lang1058\i\f0 <parameter>\i0  \-\emdash  some parameter of the message sent, its presence and possible values are depended on message type;\par
\lang1033\f2\'b7\tab\lang1058\i\f0 <delimiter>\i0  \emdash  special symbol \lquote #\rquote  which separates parts of a message;\par
\lang1033\f2\'b7\tab\lang1058\i\f0 <EOM>\i0  (end of message) \emdash  special symbol sequence (CR CL) which determines the end of a message.\par
\pard\nowidctlpar\li1065\qj All elements of message are plain text in ASCII encoding and can\rquote t include the same symbol as delimiter and EOM. Digital parameters are sequences of decimal digits represented by symbols \lquote 0\rquote  through \lquote 9\rquote .\par
\par
\pard\nowidctlpar\fi-705\li1065\qj\b\fs28 3.\tab Types of messages and their structure\b0\fs24\par
\pard\nowidctlpar\li1065\qj\par
\pard\nowidctlpar\fi-420\li1485\qj 3.1.\tab Messages from client side:\par
\pard\nowidctlpar\li1080\qj\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 CS_SEND_NICK\b0\i0\cell Syntax:\par
\i CS_SEND_NICK <nickname>\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\line\i <nickname>\i0  \emdash  nickname of a player\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Client sends this message to enter in a game.\cell\row\pard\sa200\sl276\slmult1\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i CS_DISCONNECT\b0\i0\cell Syntax:\par
\i CS_DISCONNECT\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\lang1033\f1  none\lang1058\f0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Client sends this message to quit a game either while playing or before a game actually starts.\cell\row\pard\sa200\sl276\slmult1\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i CS_FIRE\b0\i0\cell Syntax:\par
\i CS_FIRE\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters: none\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Client sends this message with request to make fire action.\cell\row\pard\sa200\sl276\slmult1\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i CS_MOVE\b0\i0\cell Syntax:\par
\i CS_MOVE\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters: none\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Client sends this message with request to make move action.\cell\row\pard\sa200\sl276\slmult1\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i CS_TURN\b0\i0\cell Syntax:\par
\i CS_TURN\i0  \i <\lang1033\f1 turn \lang1058\f0 direction>\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <\lang1033\f1 turn \lang1058\f0 direction>\i0  \emdash  \lang1033\f1 the \lang1058\f0 direction \lang1033\f1 of rotation of the tank\lang1058\f0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Client sends request to \lang1033\f1 rotate\lang1058\f0  his tank in given direction.\cell\row\pard\sa200\sl276\slmult1\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i CS_STOP_MOVE\b0\i0\cell Syntax:\par
\i CS_STOP_MOVE\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters: none\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Client sends this command when player stops movement.\cell\row\pard\sa200\sl276\slmult1\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i CS_STOP_FIRE\b0\i0\cell Syntax:\par
\i CS_STOP_FIRE\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters: none\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose: \par
Client sends this command when player stops shooting.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\pard\nowidctlpar\fi-420\li1485\qj 3.2.\tab Messages from host side:\par
\pard\nowidctlpar\li1485\qj\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_CONN_ACCEPTED\b0\i0\cell Syntax:\par
\i SC_CONN_ACCEPTED <player id>\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <player id>\i0  \emdash\fs20  \fs22 ID assigned to the tank controlled by sender of recent \i CS_SEND_NICK\i0  message\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends this message to inform a client about successful connection to the game hosted.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_CONN_REJECTED\b0\i0\cell Syntax:\par
\i SC_CONN_REJECTED <message>\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <message>\i0  \emdash\fs20  \fs22 a message explaining why connection was rejected\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends this message to inform a client that connection to the game hosted was failed.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_PLAYERLIST\b0\i0\cell Syntax:\par
\i SC_PLAYERLIST <id 1> <nickname 1> [<id 2> <nickname 2>[\'85]]\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <id i> <nickname i>\i0  \emdash\fs20  \fs22 ID of the tank and nickname of ith player\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends this message to all connected clients when the list of players changes (one client is connected/disconnected).\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\par
\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_GAME_START\b0\i0\cell Syntax:\par
\i SC_GAME_START\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters: none\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends this message to notify all connected players that the game starts from now.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_GAME_END\b0\i0\cell Syntax:\par
\i SC_GAME_END <player id>\i0\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <player id>\i0  \emdash\fs20  \fs22 ID of the winning player\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends this message to notify all connected players that the game is ended and winner is player with ID specified.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_SEND_SNAPSHOT\b0\i0\cell\pard\intbl\nowidctlpar Syntax:\par
\i SC_SEND_SNAPSHOT\lang1033\f1  \par
<tanks number>\lang1058\f0\par
<player id 1> <health level> <position x> <position y> <action type> <direction> <progress> [\'85]\par
[<bullet id 1>< position x> <position y> <direction> <progress> [\'85] ]\par
\par
\i0 Firstly \lang1033\f1 number of \lang1058\f0 tanks \lang1033\f1 presented in current snapshot are given in first parameter. Then for each tank there are parameters in \lang1058\f0 the format given above:\par
\i <player id 1> <health level> <position x> <position y> <action type> <direction> <progress>\par
\i0 Then all bullets on board are described sequentially one by one in the format given above:\par
\i <bullet id 1>< position x> <position y> <direction> <progress>\par
\i0 There may be no bullets.\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\pard\intbl\nowidctlpar\lang1033\i\f1 <tanks number> \i0 - number of tanks, described in current snapshot.\lang1058\f0\par
\pard\intbl\nowidctlpar\qj\i <player id i> \i0\emdash\fs20   \fs22 ID of ith player\i ;\par
<health level> \i0\emdash\fs20   \fs22 current health level of the tank with specified ID; \par
\i <position x>\i0  \emdash\fs20   \fs22 horizontal position of the tank with specified ID;\par
\i <position y>\i0  \emdash\fs20   \fs22 vertical position of the tank with specified ID;\par
\i <action type>\i0  \emdash\fs20   \fs22 type of action the tank with specified ID is performing (whether it is staying, moving or rotating);\par
\i <direction>\i0  \emdash\fs20   \fs22 direction of the tank with specified ID;\par
<\i progress> \i0\emdash\fs20  \fs22 level of completeness the tank with specified ID is performing;\par
\i <bullet id i> \i0\emdash  ID of ith bullet\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends this message to all connected clients when there made remarkable changes on game\rquote s board. This can occur in different cases (see in the section Message Sequence). It also is sent periodically to synchronize clients with host.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_SEND_MAP\b0\i0\cell Syntax:\par
\i SC_SEND_MAP \lang1033\f1 <map_size> \lang1058\f0 <map data> <health> <motion speed> <\lang1033\f1 bullet \lang1058\f0 speed> <fire rate>\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\lang1033\i\f1 <map size> \i0 - size of map which will be used\lang1058\f0\par
\i <map data>\i0  \emdash  map data used for current game;\par
\i <health> \i0\emdash  initial health of tanks;\par
\i <motion speed>\i0  \emdash  the speed of motions of tanks;\par
\i <\lang1033\f1 bullet \lang1058\f0 speed> \lang1033\f1  - \i0 the speed of a bullet\lang1058\i\f0\par
<fire rate>\i0  \emdash  minimal period between two sequential firings\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host sends map and configuration of the current game to connected players before game actually starts.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_MOVE\b0\i0\cell Syntax:\par
\i SC_MOVE <player id>\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <player id>\i0  \emdash  ID of the player whose tank made a move action\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host broadcasts this message to inform all players that the tank with specified ID made a move action.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_FIRE\b0\i0\cell Syntax:\par
\i SC_FIRE <player id>\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <player id>\i0  \emdash  ID of the player whose tank made a fire action\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host broadcasts this message to inform all players that the tank with specified ID made a fire action.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_TURN\b0\i0\cell Syntax:\par
\i SC_TURN <player id> <\lang1033\f1 turn \lang1058\f0 direction>\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters:\par
\i <player id>\i0  \emdash  ID of the player whose tank is making rotate action;\par
\i <\lang1033\f1 turn \lang1058\f0 direction>\i0  - \lang1033\f1 rotation \lang1058\f0 direction of the tank with specified ID\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host broadcasts this message to inform all players that the tank with specified ID changed direction.\par
\lang1033\f1 Server drops all "CS_FIRE" commands while rotating.\lang1058\f0\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_STOP_MOVE\b0\i0\cell Syntax:\par
\i CS_STOP_MOVE <player id>\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters:\i  \par
<player id>\i0  \emdash  ID of the player whose tank stopped motion\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host broadcasts this message to inform all players that the tank with specified ID stopped motion.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmgf\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\nowidctlpar\qj\b\i\fs22 SC_STOP_FIRE\b0\i0\cell Syntax:\par
\i CS_STOP_FIRE <player id>\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\i0\cell\pard\intbl\nowidctlpar\qj Parameters:\i  \par
<player id>\i0  \emdash  ID of the player whose tank stopped firing\cell\row\trowd\trgaph108\trleft1065\trrh1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3
\clvmrg\clvertalc\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx3261\clcbpat2\clbrdrl\brdrw5\brdrs\brdrcf1\clbrdrt\brdrw5\brdrs\brdrcf1\clbrdrr\brdrw5\brdrs\brdrcf1\clbrdrb\brdrw5\brdrs\brdrcf1 \cellx9855\pard\intbl\cell\pard\intbl\nowidctlpar\qj Purpose:\par
Host broadcasts this message to inform all players that the tank with specified ID stopped firing.\cell\row\pard\nowidctlpar\li1485\qj\fs24\par
\pard\nowidctlpar\fi-420\li1485\qj 3.3.\tab Parameters\rquote  format:\par
\pard\nowidctlpar\fi-360\li1425\qj\lang1033\f2\'b7\tab\lang1058\f0 <player id> \emdash  number from 0 to 7\par
\lang1033\f2\'b7\tab\lang1058\f0 <bullet id> \emdash  non-negative number\par
\lang1033\f2\'b7\tab\lang1058\f0 <message> \emdash  any sequence containing any ASCII symbols except of delimiter and EOM\par
\lang1033\f2\'b7\tab\lang1058\f0 <nickname> \emdash  any sequence composed of Latin letters and Arabic digits and of length between 3 and 15 symbols inclusively\par
\lang1033\f2\'b7\tab\lang1058\f0 <direction> \emdash  single symbol, one of following: \lquote\lang1033\f1 N\lang1058\f0\rquote  (\lang1033\f1 north\lang1058\f0 ), \lquote\lang1033\f1 S\lang1058\f0\rquote  (\lang1033\f1 south\lang1058\f0 ), \lquote\lang1033\f1 E\lang1058\f0\rquote  (\lang1033\f1 east\lang1058\f0 ), \lquote\lang1033\f1 W\lang1058\f0\rquote  (\lang1033\f1 west\lang1058\f0 )\lang1033\f1 . Defines global direction for some game objects.\lang1058\f0\par
\lang1033\f2\'b7\tab\lang1058\f0 <\lang1033\f1 turn \lang1058\f0 direction> \emdash  single symbol, one of following: \lquote L\rquote  (left), \lquote R\rquote  (right)\par
\pard\nowidctlpar\fi-405\li1485\qj\lang1033\f2\'b7\tab\lang1058\f0 <health level> \emdash  number from N to 0, where N is health level at start\par
\lang1033\f2\'b7\tab\lang1058\f0 <position x> \emdash  number of column of cells where object was last time (for bullet this is a first column right to bullet)\lang1033\f1\fs22  \par
For the following 2 parameters global position of tank is determined by position of its center.\lang1058\f0\fs24\par
\lang1033\f2\'b7\tab\lang1058\f0 <position y> \emdash  number of row of cells where player was last time (for bullet this is a first row below to bullet)\par
\lang1033\f2\'b7\tab\lang1058\f0 <action type> \emdash  single symbol, one of following: \lquote S\rquote  (staying), \lquote M\rquote  (moving\lang1033\f1  forward\lang1058\f0 ), \lquote R\rquote  (rotating\lang1033\f1  right\lang1058\f0 )\lang1033\f1 , \lang1058\f0\lquote\lang1033\f1 L\lang1058\f0\rquote  (rotating\lang1033\f1  left\lang1058\f0 )\par
\lang1033\f2\'b7\tab\lang1058\f0 <progress> \emdash  percentage of action completeness, integer from 0 to 99\par
\lang1033\f2\'b7\tab\lang1058\f0 <\lang1033\f1 tanks number\lang1058\f0 > \emdash  \lang1033\f1 integer from 1 to 8\lang1058\f0\par
\lang1033\f2\'b7\tab\lang1058\f0 <\lang1033\f1 map size\lang1058\f0 > \emdash  \lang1033\f1 positive integer N, which defines number of rows and columns for map. Number of rows equals to number of columns (NxN).\lang1058\f0\par
\lang1033\f2\'b7\tab\lang1058\f0 <map data> \emdash  sequence of symbols representing cells\rquote  content. Cells are written row by row. Each symbol can be on of following: \lquote E\rquote  (empty), \lquote W\rquote  (wall), \lquote B\rquote  (bush)\par
\lang1033\f2\'b7\tab\lang1058\f0 <health> \emdash  integer from 1 to 10, means number of damages needed to kill a tank\par
\lang1033\f2\'b7\tab\lang1058\f0 <motion speed> \emdash  integer from 1 to \lang1033\f1 10\lang1058\f0 , determines tank motion speed in cells per second\par
\lang1033\f2\'b7\tab\f1 <bullet speed> \lang1058\f0\emdash\lang1033\f1  integer multiplier (from 2 to 10) of motion speed, determines the movement speed of bullet\lang1058\f0\par
\lang1033\f2\'b7\tab\lang1058\f0 <fire rate> \fs22\emdash  \fs24 integer from 100 to 5000, determines period between sequential shootings of the same tank  in milliseconds\par
\pard\nowidctlpar\qj\par
\pard\nowidctlpar\fi-705\li1065\qj\b\fs28 4.\tab Message sequences.\b0\fs24\par
\pard\nowidctlpar\li1065\qj Messages are sent in strict cases as a result of some event in the game or as an answer to previous message.\par
\pard\nowidctlpar\fi-360\li1425\qj\lang1033\f2\'b7\tab\lang1058\f0 When connection between host and client is established, host sends back a message \b\i SC_PLAYERLIST\b0\i0  to that client. Then client sends to host a \b\i CS_SEND_NICK\b0\i0  message.\par
\lang1033\f2\'b7\tab\lang1058\f0 After a client have sent message \b\i CS_SEND_NICK\b0\i0  a host must send back to sender either \b\i SC_CONNECTION_ACCEPTED\b0\i0  or \b\i SC_CONNECTION_REJECTED\b0\i0  message. Second case takes place if the nickname specified in request message is chosen by other player already (checking is performed case insensitively) or there is no place for one more player in this game; first case takes place otherwise. In first case a host sends a message \b\i SC_PLAYERLIST\b0\i0  with updated list to all connected clients (including new one) as well\par
\lang1033\f2\'b7\tab\lang1058\f0 When host starts the game, it sends to all connected clients two messages: first is \b\i SC_SEND_MAP\b0\i0  and second is \b\i SC_\lang1033\f1 START_GAME\lang1058\b0\i0\f0 . The\lang1033\f1 n\lang1058\f0  host sends to all connected clients \b\i SC_SEND_SNAPSHOT\lang1033\f1  \b0\i0 message w\lang1058\f0 ith the initial positions of the players\par
\lang1033\f2\'b7\tab\lang1058\f0 After a client have sent message \b\i CS_DISCONNECT\b0\i0  a host kills his tank and sends all other connected clients \b\i SC_SEND_SNAPSHOT\b0\i0  message. Player of that tank is considered to lose the game. Host won\rquote t send messages to this client anymore.\par
\lang1033\f2\'b7\tab\lang1058\f0 After the game started clients are able to send messages of type \b\i CS_FIRE\b0\i0 , \b\i CS_MOVE\b0\i0 ,\b\i  CS_STOP_FIRE\b0\i0 , \b\i CS_STOP_MOVE\b0\i0 , \b\i CS_TURN\b0\i0  to host. Once received such a message host either rejects it (ignore) or accepts. In later case host sends a message \b\i SC_FIRE\b0\i0 , \b\i SC_MOVE\b0\i0 , \b\i SC_STOP_FIRE\b0\i0 , \b\i SC_STOP_MOVE\b0\i0 , \b\i SC_TURN\b0\i0  respectively to all players.\par
\lang1033\f2\'b7\tab\lang1058\f0 When a bullet damages some tank, host broadcasts to all connected clients \b\i SC_SEND_SNAPSHOT\b0\i0  message. If the health level of that tank decreased to zero, then the player controlling that tank is considered to lose the game and host won\rquote t accept \b\i CS_FIRE\b0\i0 , \b\i CS_MOVE\b0\i0 ,\b\i  CS_STOP_FIRE\b0\i0 , \b\i CS_STOP_MOVE\b0\i0 , \b\i CS_TURN\b0\i0  messages from it anymore; role of this player is observer form now.\par
\pard\nowidctlpar\qj\par
\pard\nowidctlpar\qc\b\fs32\par
\pard\nowidctlpar\qj\fs28 1.\tab\lang1033\f1 Example\lang1058\f0\fs24\par
\lang1033\b0\f1 "S:" notation means that server broadcasts message to all connected clients.\par
\pard\nowidctlpar\qc\lang1058\b\f0 Client 0 connects to server.\i\par
\pard\nowidctlpar\qj\b0\i0 S->C0:\lang1033\f1\tab\lang1058\f0 SC_PLAYERLIST/CR/LF\par
C0->S:\lang1033\f1\tab\lang1058\f0 CS_SEND_NICK#Sega/CR/LF\par
S->C0:\lang1033\f1\tab\lang1058\f0 SC_CONN_ACCEPTED#0/CR/LF\par
S:\lang1033\f1\tab\lang1058\f0 SC_PLAYERLIST#0#Sega/CR/LF\par
\par
\pard\nowidctlpar\qc\b Client 1 connects to server.\par
\pard\nowidctlpar\qj\b0 S->C1:\lang1033\f1\tab\lang1058\f0 SC_PLAYERLIST#0#Sega/CR/LF\par
C1->S:\lang1033\f1\tab\lang1058\f0 CS_SEND_NICK#Dandy/CR/LF\par
S->C1:\lang1033\f1\tab\lang1058\f0 SC_CONN_ACCEPTED#1/CR/LF\par
S: \tab SC_PLAYERLIST#0#Sega#1#Dandy/CR/LF\par
\par
\pard\nowidctlpar\qc\b Client 2 connects to server.\par
\pard\nowidctlpar\qj\b0 S->C2:\lang1033\f1\tab\lang1058\f0 SC_PLAYERLIST#0#Sega#1#Dandy/CR/LF\par
C2->S:\lang1033\f1\tab\lang1058\f0 CS_SEND_NICK#Sega#/CR/LF\par
S->C2:\lang1033\f1\tab\lang1058\f0 SC_CONN_REJECTED#Such nickname \lang1033\f1 is \lang1058\f0 already \lang1033\f1 present\lang1058\f0 . Change it please!/CR/LF\par
C2->S:\lang1033\f1\tab\lang1058\f0 CS_SEND_NICK#CQG/CR/LF\par
S->C2:\lang1033\f1\tab\lang1058\f0 SC_CONN_ACCEPTED#2/CR/LF\par
S:\lang1033\f1\tab\lang1058\f0 SC_PLAYERLIST#0#Sega#1#Dandy#2#CQG/CR/LF\par
\par
\pard\nowidctlpar\qc\b Client 1 \lang1033\f1 disconne\lang1058\f0 cts \lang1033\f1 from\lang1058\f0  \lang1033\f1 server\lang1058\f0 .\b0\par
\pard\nowidctlpar\qj C1->S:\lang1033\f1\tab\lang1058\f0 CS_DISCONNECT##\par
S: \lang1033\f1\tab\lang1058\f0 SC_PLAYERLIST#0#Sega#2#CQG/CR/LF\par
\par
\pard\nowidctlpar\qc\lang1033\b\f1 Game starts\lang1058\b0\f0\par
\pard\nowidctlpar\qj S: \tab SC_GAME_START/CR/LF\par
S: \tab SC_SEND_MAP#\lang1033\f1 128#\lang1058\f0 EEEWWBEEEBEEBBBWW\lang1033\f1 ...\lang1058\f0 WEWEWEW#5#10#\lang1033\f1 3#500\lang1058\f0 /CR/LF\par
\pard\nowidctlpar S:\tab SC_SEND_SNAPSHOT#0#2#3#5#S#\lang1033\f1 W\lang1058\f0 #0#2#2#17#5#S#\lang1033\f1 S\lang1058\f0 #0/CR/LF\par
C0->S:\lang1033\f1\tab\lang1058\f0 CS_MOVE/CR/LF\par
\pard\nowidctlpar\qj S:\lang1033\f1\tab\lang1058\f0 SC_MOVE#0/CR/LF\par
\pard\nowidctlpar C2->S:\lang1033\f1\tab\lang1058\f0 CS_MOVE/CR/LF\par
\pard\nowidctlpar\qj S:\tab SC_MOVE#2/CR/LF\par
C0->S:\lang1033\f1\tab\lang1058\f0 CS_FIRE/CR/LF\par
S:\tab SC_FIRE #0/CR/LF\par
C0->S:\lang1033\f1\tab\lang1058\f0 CS_STOP_FIRE/CR/LF\par
S:\tab SC_STOP_FIRE#0/CR/LF\par
C2->S:\lang1033\f1\tab\lang1058\f0 CS_TURN#\lang1033\f1 R\lang1058\f0 /CR/LF\par
S:\tab SC_TURN#2#\lang1033\f1 R\lang1058\f0 /CR/LF\par
\pard\nowidctlpar S:\tab SC_SEND_SNAPSHOT#0#2#10#5#S#\lang1033\f1 E\lang1058\f0 #25#2#1#12#6#S#\lang1033\f1 N\lang1058\f0 #25/CR/LF\par
\pard\nowidctlpar\qj C0->S:\lang1033\f1\tab\lang1058\f0 CS_TURN#\lang1033\f1 L\lang1058\f0 /CR/LF\par
S:\tab SC_TURN#0#\lang1033\f1 L\lang1058\f0 /CR/LF\par
\'85\par
S:\tab SC_GAME_END#2/CR/LF\par
\pard\nowidctlpar\par
\pard\nowidctlpar\qj //All understand that winner is Sega player.\i\fs22\par
\par
}
 